package model

type Inventory map[string]Group

type Group struct {
	HostVars map[string]HostVars `json:"hosts"` // key 是主机名
}

type HostVars struct {
	AnsibleHost     string `json:"ansible_host"`
	AnsiblePort     int    `json:"ansible_port"`
	AnsibleUser     string `json:"ansible_ssh_user"`
	AnsiblePassword string `json:"ansible_ssh_pass"`
}

type V1Group struct {
	Name string `json:"name"`
	Host []Host `json:"host"`
}

type Host struct {
	Alias          string `json:"alias"`
	AnsibleHost    string `json:"ansible_host"`
	AnsiblePort    int    `json:"ansible_port"`
	AnsibleSshUser string `json:"ansible_ssh_user"`
	AnsibleSshPass string `json:"ansible_ssh_pass"`
}
